package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 供货批次信息表
 */
@Data
@TableName("t_supplyInfo")
public class SupplyInfoBean {
    /**
     * id
     */
    @TableId(value = "pk_supplyInfo",type = IdType.AUTO)
    private Integer id;
    /**
     * 供货订单跟踪表
     */
    @TableField("trackId")
    private String trackId;
    /**
     * 供货单编号
     */
    @TableField("supplyRefId")
    private String supplyRefId;//
    /**
     * 供货批次号
     */
    @TableField("supplyId")
    private String supplyId;//
    /**
     * 供货商
     */
    @TableField("supplier")
    private String supplier;//
    /**
     * 供货数量
     */
    @TableField("num")
    private int num;

    /**
     * 总供货数量
     */
    @TableField("allNum")
    private int allNum;
    /**
     * 供货总金额
     */
    @TableField("allMoney")
    private Double allMoney;//
    /**
     * 供货时间
     */
    @TableField("inDate")
    private LocalDateTime inDate;//
    /**
     * 供货类型
     */
    @TableField("supplyType")
    private String supplyType;
    /**
     * 供货状态
     */
    @TableField("status")
    private String status;
    /**
     * 该供货订单里的供货商品集合
     */
    @TableField(exist = false)
    private List<InProductBean> inProductBeans;


    public SupplyInfoBean() {
    }

    public SupplyInfoBean(String supplier, int num, int allNum) {
        this.supplier = supplier;
        this.num = num;
        this.allNum = allNum;
    }

    public SupplyInfoBean(String supplyRefId, String supplyId, String supplier, Double allMoney, LocalDateTime inDate) {
        this.supplyRefId = supplyRefId;
        this.supplyId = supplyId;
        this.supplier = supplier;
        this.allMoney = allMoney;
        this.inDate = inDate;
    }

    public SupplyInfoBean(String supplyRefId, String supplyId, String supplier, int num,int allNum,Double allMoney, LocalDateTime inDate, String status) {
        this.supplyRefId = supplyRefId;
        this.supplyId = supplyId;
        this.supplier = supplier;
        this.num=num;
        this.allNum = allNum;
        this.allMoney = allMoney;
        this.inDate = inDate;
        this.status=status;
    }
}
